/*
 * @Author: 13212657520 10828485+zhaosieve@user.noreply.gitee.com~
 * @Date: 2022-05-24 21:00:53
 * @LastEditors: 13212657520 10828485+zhaosieve@user.noreply.gitee.com~
 * @LastEditTime: 2022-05-30 19:31:06
 * @FilePath: \vue-2202\src\api\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "../utils/request";
export const getLunbo = () => {
  return request({ method: "get", url: "/api/getlunbo" });
};
export const Grid = () => {
  return request({ method: "get", url: "/api/grids" });
};
export const newsList = () => {
  return request({ method: "get", url: "/api/getnewslist" });
};
export const newsListInfo = (id) => {
  return request({ method: "get", url: "/api/getnew/" + id });
};
export const Comments = ({ id, page, limit }) => {
  return request({
    method: "get",
    url: `/api/getcomments/${id}?pageindex=${page}&limit=${limit}`,
  });
};
export const addComments = (id, content) => {
  return request({
    method: "post",
    url: `/api/postcomment/` + id,
    data: {
      content,
    },
  });
};
export const photoList = () => {
  return request({ method: "get", url: "/api/getimgcategory/" });
};
export const getImages = (id) => {
  return request({ method: "get", url: "/api/getimages/" + id });
};
export const goods = ({ page, limit }) => {
  return request({
    method: "get",
    url: `/api/getgoods?pageindex=${page}&limit=${limit}`,
  });
};
export const thumImages = (id) => {
  return request({ method: "get", url: "/api/getthumimages/" + id });
};
export const imageInfo = (id) => {
  return request({ method: "get", url: "/api/getimageInfo/" + id });
};
export const info = (id) => {
  return request({ method: "get", url: "/api/goods/getinfo/" + id });
};
export const allGoods = (id) => {
  return request({
    method: "get",
    url: "/api/getthumimages/" + id,
  });
};
